<template>
	<view class="accountdBox">
		<my-top @back="back" :isline="true" title="账号与安全"></my-top>
		<view class="content">
			<view>
				<view class="content-top">手机号</view>
				<view class="content-item">
					<text>18537234312</text>
					<view class="" @click="replacePhone">
						
					<text style="color: #999999;">更换<text class="iconfont todaygengduo"></text></text>
					</view>
				</view>
			</view>

			<view>
				<view class="content-top">安全设置</view>
				<view class="content-item">
					<text>修改登录密码</text>
					<text style="color: #999999;"><text class="iconfont todaygengduo"></text></text>
				</view>
				<view class="content-item">
					<text>手势密码</text>
					<switch @change="gestureChange" :checked="false" />
				</view>
				<view class="content-item">
					<text>修改手势密码</text>
					<text style="color: #999999;"><text class="iconfont todaygengduo"></text></text>
				</view>
			</view>

			<view>
				<view class="content-top">绑定设置</view>
				<view class="content-item">
					<text>微信</text>
					<view @click="getuserinfo" class="">

						<text style="color: #999999;">未绑定<text class="iconfont todaygengduo"></text></text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {}

		},
		methods: {
			replacePhone(){
				uni.navigateTo({
					url: "replacePhone",
					animationType: "pop-in",
					animationDuration: 200
				})
			},
			//跳转到微信
			getuserinfo(val) {
				var UIApplication = plus.ios.import('UIApplication');
				var NSURL = plus.ios.import('NSURL');
				var setting = NSURL.URLWithString('weixin://');
				var application = UIApplication.sharedApplication();
				application.openURL(setting);
				plus.ios.deleteObject(setting);
				plus.ios.deleteObject(application);
			},
			gestureChange(val) {
				if (val.detail.value) {
					setTimeout(() => {
						uni.navigateTo({
							url: "gesture",
							animationType: "pop-in",
							animationDuration: 200
						})
					}, 300)
				}
			}
		},
		created() {

		}

	}
</script>

<style scoped lang="scss">
	.content-top {
		padding: 0 32rpx;
		color: #999999;
		font-size: 28rpx;
		height: 80rpx;
		line-height: 80rpx;

	}

	.content-item {
		height: 80rpx;
		background-color: #FFFFFF;
		padding: 0 32rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: #333333;
		border-bottom: 1px solid #DDDDDD;
		font-size: 28rpx;
	}

	.accountdBox {
		width: 100%;
		min-height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #F8F8F8;
	}
</style>
